﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Collections;

namespace E.Y.E.Jobs
{
    class InformationPackageEnumClass
    {
        public enum CommandType { Add, Edit, Delete, Clear, Complete, Undo, Redo, Search, AddKeyword, EditKeyword, DeleteKeyword, UnknownCommand, OperationError };
    }

    class InformationPackage
    {
        private const int POSITION_FIRST_TASK = 0;

        InformationPackageEnumClass.CommandType CurrCommandType;
        ArrayList CurrTaskList;
        string CurrMessage;

        public InformationPackage()
        {
            CommandType = InformationPackageEnumClass.CommandType.UnknownCommand;
            CurrTaskList = new ArrayList();
            Message = "";
        }

        public InformationPackageEnumClass.CommandType CommandType
        {
            get
            {
                return CurrCommandType;
            }
            set
            {
                CurrCommandType = value;
            }
        }

        public ArrayList TaskList
        {
            get
            {
                return CurrTaskList;
            }
            set
            {
                CurrTaskList = value;
            }
        }

        public Task Task
        {
            get
            {
                return (Task)CurrTaskList[POSITION_FIRST_TASK];
            }
            set
            {
                CurrTaskList = new ArrayList();
                CurrTaskList.Add(value);
            }
        }

        public string Message
        {
            get
            {
                return CurrMessage;
            }
            set
            {
                CurrMessage = value;
            }
        }
    }
}
